/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author usuario
 */
@Embeddable
public class PagoproveedorPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nropago")
    private int nropago;
    @Basic(optional = false)
    @Column(name = "idcompra")
    private String idcompra;

    public PagoproveedorPK() {
    }

    public PagoproveedorPK(int nropago, String idcompra) {
        this.nropago = nropago;
        this.idcompra = idcompra;
    }

    public int getNropago() {
        return nropago;
    }

    public void setNropago(int nropago) {
        this.nropago = nropago;
    }

    public String getIdcompra() {
        return idcompra;
    }

    public void setIdcompra(String idcompra) {
        this.idcompra = idcompra;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nropago;
        hash += (idcompra != null ? idcompra.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PagoproveedorPK)) {
            return false;
        }
        PagoproveedorPK other = (PagoproveedorPK) object;
        if (this.nropago != other.nropago) {
            return false;
        }
        if ((this.idcompra == null && other.idcompra != null) || (this.idcompra != null && !this.idcompra.equals(other.idcompra))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.PagoproveedorPK[ nropago=" + nropago + ", idcompra=" + idcompra + " ]";
    }
    
}
